<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>投注记录</title>
		<meta name="format-detection" content="telephone=no,email=no"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
		<link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
		<link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
		<link href="__PUBLIC__/Home/css/page.css" rel="stylesheet">
		<script>
			;
			(function (win, lib) {
				var doc = win.document;
				var docEl = doc.documentElement;
				var metaEl = doc.querySelector('meta[name="viewport"]');
				var flexibleEl = doc.querySelector('meta[name="flexible"]');
				var dpr = 0;
				var scale = 0;
				var tid;
				var flexible = lib.flexible || (lib.flexible = {});
		
				if (metaEl) {
					// console.warn('将根据已有的meta标签来设置缩放比例');
					var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/);
					if (match) {
						scale = parseFloat(match[1]);
						dpr = parseInt(1 / scale);
					}
				} else if (flexibleEl) {
					var content = flexibleEl.getAttribute('content');
					if (content) {
						var initialDpr = content.match(/initial\-dpr=([\d\.]+)/);
						var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/);
						if (initialDpr) {
							dpr = parseFloat(initialDpr[1]);
							scale = parseFloat((1 / dpr).toFixed(2));
						}
						if (maximumDpr) {
							dpr = parseFloat(maximumDpr[1]);
							scale = parseFloat((1 / dpr).toFixed(2));
						}
					}
				}
				if (!dpr && !scale) {
					var isAndroid = win.navigator.appVersion.match(/android/gi);
					var isIPhone = win.navigator.appVersion.match(/iphone/gi);
					var devicePixelRatio = win.devicePixelRatio;
					if (isIPhone) {
						// iOS下，对于2和3的屏，用2倍的方案，其余的用1倍方案
						if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {
							dpr = 3;
						} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)) {
							dpr = 2;
						} else {
							dpr = 1;
						}
					} else {
						// 其他设备下，仍旧使用1倍的方案
						dpr = 1;
					}
					scale = 1 / dpr;
				}
				docEl.setAttribute('data-dpr', dpr);
				if (!metaEl) {
					metaEl = doc.createElement('meta');
					metaEl.setAttribute('name', 'viewport');
					metaEl.setAttribute('content', 'initial-scale=' + scale + ', maximum-scale=' + scale +
						', minimum-scale=' + scale + ', user-scalable=no');
					if (docEl.firstElementChild) {
						docEl.firstElementChild.appendChild(metaEl);
					} else {
						var wrap = doc.createElement('div');
						wrap.appendChild(metaEl);
						doc.write(wrap.innerHTML);
					}
				}
		
				function refreshRem() {
					var width = docEl.getBoundingClientRect().width;
					if (width / dpr > 750) {
						width = 750 * dpr;
					}
					var rem = width / 10;
					docEl.style.fontSize = rem + 'px';
					flexible.rem = win.rem = rem;
				}
				win.addEventListener('resize', function () {
					clearTimeout(tid);
					tid = setTimeout(refreshRem, 100);
				}, false);
				win.addEventListener('pageshow', function (e) {
					if (e.persisted) {
						clearTimeout(tid);
						tid = setTimeout(refreshRem, 100);
					}
				}, false);
				if (doc.readyState === 'complete') {
					doc.body.style.fontSize = 12 * dpr + 'px';
				} else {
					doc.addEventListener('DOMContentLoaded', function (e) {
						doc.body.style.fontSize = 12 * dpr + 'px';
					}, false);
				}
		
				refreshRem();
				flexible.dpr = win.dpr = dpr;
				flexible.refreshRem = refreshRem;
				flexible.rem2px = function (d) {
					var val = parseFloat(d) * this.rem;
					if (typeof d === 'string' && d.match(/rem$/)) {
						val += 'px';
					}
					return val;
				}
				flexible.px2rem = function (d) {
					var val = parseFloat(d) / this.rem;
					if (typeof d === 'string' && d.match(/px$/)) {
						val += 'rem';
					}
					return val;
				}
			})(window, window['lib'] || (window['lib'] = {}));
		</script>
	</head>
	<style type="text/css">
		.pages>div>.current {
			background: #a8a8a8;
			color: #fff;
		}
		.pages>div>* {
			display: inline-block;
			padding: 4px 8px;
			border: 1px solid #a8a8a8;
			margin: 2px;
		}
		.pages{
			position: fixed;
			bottom: 1.2rem;
			width: 100%;
			background: #fff;
		}
	html,body{
		margin: 0;
		padding: 0;
		border: none;
		overflow: auto;
	}
		/* body {
			-moz-user-select: none;
			-webkit-user-select: none;
			-ms-user-select: none;
			-khtml-user-select: none;
			-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
			overflow-y: scroll;
		}
		.facesj{
			display: inline-block;
			background-color: #1fa1dc;
			width: 60px;
		    height: 32px;
		    line-height: 32px;
		    border-radius: 3px;
		    text-align: center;
		    font-size: 14px;
		    margin-top:6px;
		    border: 1px solid #1fa1dc;
		    color: #FFF;
		    margin-left:10px;
		}
		.alipay_choose,.bank_choose{display: none}

		.header .ptitle{height:45px;line-height: 45px;}

		.pages a,.pages span {
		    display:inline-block;
		    padding:4px 7px;
		    margin:0 2px;
		    border:1px solid #D5D4D4;
		    -webkit-border-radius:1px;
		    -moz-border-radius:1px;
		    border-radius:1px;
		}
		.pages a,.pages li {
		    display:inline-block;
		    list-style: none;
		    text-decoration:none; color:#3399ff;
		}
		
		.pages a:hover{
		    border-color:#3399ff;
		}
		.pages span.current{
		    background:#3399ff;
		    color:#FFF;
		    font-weight:700;
		    border-color:#3399ff;
		}
		.pages{
			text-align: center;
		}
		.layui-layer{
			top:48px !important;
		}
		.record-content .record-no *{color:#000;}
		.back{
			display: block;width:100%;height:40px;line-height: 40px;font-size:16px;text-align: center;color:#d4a448;
			position: fixed;bottom:0;background:#393a3e;
		} */
.record-top{
	width: 100%;
	height: 1.6rem;
	background-color: #08c261;
}
.lable{
	width: 9.33rem;
	height: 1.6rem;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
 .lable a{
	 background-color: transparent;
	 display: block;
	 width: 1.86rem;
	 height: 0.667rem;
	 text-align: center;
	 line-height: 0.667rem;
	 border-radius: 5px;
	 color: #fff;
	 text-decoration: none;
	 font-size: 0.39rem;
	 font-weight: 500;
 }
  .water{
	  width: 100%;
	  height: 1.06rem;
	  color: #979797;
	  background-color: white;
	  padding-left: 0.4rem;
	  line-height: 1.06rem;
	  border-bottom: 1px solid #cacaca;
	  border-top: 1px solid #cacaca;
  }
  .water span{
	  font-size: 0.39rem;
  }
  footer {
		width: 10rem;
		height: 1.33rem;
		left: 50%;
		transform: translate(-50%);
		background-color: #131314;
		position: fixed;
		bottom: 0;
		z-index: 1111;
		display: flex;
		justify-content: space-around;
		box-sizing: border-box;
		padding: 5px 0;
	}
	.record-content{
		margin-top: 0.2rem;
		overflow: auto;
	}
	.record-no span{
		color: #ff6600;
	}
	footer a {
		color: #fff98d;
		display: block;
		text-align: center;
		text-decoration: none;
		-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
		-webkit-user-select: none;
		-moz-user-focus: none;
		-moz-user-select: none;
		font-size: 0.246rem;
	}
	footer a p{
		color: #fff98d;
	}
	footer a img{
		width:0.72rem;
		height: 0.653rem;
	}
	.black_overlay4{
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index:100111;
            -moz-opacity: 0.8;
            opacity:.80;
            filter: alpha(opacity=88);
          }
          .white_content4 {
            display: none;
            position: absolute;
            top: 35%;
            /* left: 25%; */
            bottom: 0;
            width: 10rem;
            height: 14.33rem;
            /* padding: 20px; */
            /* border: 10px solid orange; */
            background-color: #262626;
            z-index:100211;
            /* overflow: auto; */
            border-top: 2px solid #ffe668;
          }
          .close4{
              display: none;
              width: 0.88rem;
              height: 2.09rem;
              position: absolute;
              top:24%;
              left:50%;
              bottom: 13.24rem;
              z-index: 111111;
              transform: translate(-0.44rem);
          }
         #light4>p{
              width: 10rem;
              margin: 0;
              height: 1.06rem;
              border-bottom: 1px solid #67603a;
              text-align: center;
              line-height: 1.06rem;
              font-size: 0.546rem;
              color: #ffe668;
		  }
		header{
          width: 100%;
          height: 2.4rem;
          font-size: 0.346rem;
		  display: flex;
		  align-items: center;
		  justify-content: center;
		  position: fixed;
		  left: 0;
		  bottom: 0;
      }
	  nav{
		  width: 218px;
		  height: 38px;
		  background-color: #08c261;
		  border-radius: 5px;
	  }
      header nav a{
		  width: 100%;
		  height: 100%;
		  text-align: center;
		  line-height: 38px;
		  display: block;
          color: #fff;
          font-size: 0.4rem;
          text-decoration: none;
          /* position: absolute; */
          /* left: 0.3rem; */
          -webkit-tap-highlight-color: transparent;
            -webkit-user-select: none;
            -moz-user-focus: none;
            -moz-user-select: none;
      }
		.table{
			margin-bottom: 4rem;
		}
	</style>
	<body>
		<!-- <div class="header">
		  <div class="all_w ">
		    <div class="gofh"> <a href="javascript:history.back()"><img src="/Public/Home/img/jt_03.jpg"></a> </div>
		    <div class="ptitle">
		      下注记录
		        <a href="/" class="backgame">返回游戏</a>
		    </div>
		 
		  </div>
		</div> -->
		<div class=" text-center loginscreen  animated fadeInDown">
				<div class="record">
			<div class="record-top">
				<p class="lable">
					<a href="{:U('Home/User/xiazhu')}?t=1"><span>{$today|date="m-d",###}</span></a>
					<a href="{:U('Home/User/xiazhu')}?t=2"><span>{$today-86400|date="m-d",###}</span></a>
					<a href="{:U('Home/User/xiazhu')}?t=3"><span>{$today-86400*2|date="m-d",###}</span></a>
					<a href="{:U('Home/User/xiazhu')}?t=4"><span>Account</span></a>
				</p>
			</div>
			<div class="record-top">
				<p class="lable">
					<a href="{:U('Home/User/xiazhu')}?t={$t}&type=1"><span>Video</span></a>
					<a href="{:U('Home/User/xiazhu')}?t={$t}&type=2"><span>Lettery</span></a>
				</p>
			</div>
			<div class="water">
					<span>Betting：{$arr['bet']|default='0'}</span>&nbsp;
					<span>Proceeds：{$arr['add_points']|default='0'}</span>&nbsp;
					<span>items：{$arr['del_points']|default='0'}</span>&nbsp;
					<span>win/lose：{$arr['compare_points']|default='0'}</span>&nbsp;
				</div>
			<div class="record-content">
				<empty name="list">
					<p style="margin-top:0.2rem;color:#979797;"><span>
						<if condition="$t eq 1">{$today|date="m-d",###}</if>
						<if condition="$t eq 2">{$today-86400|date="m-d",###}</if>
						<if condition="$t eq 3">{$today-86400*2|date="m-d",###}</if>
						 Not available
					</span></p>
					<else/>
					<if condition="$t eq 4">
						<table class="table table-striped table-hover table-bordered">
							<thead>
								<tr>
									<th>Issue number</th>
									<th>content</th>
									<th>amount money</th>
									<th>Profit&loss</th>
									<th>time</th>
								</tr>	
							</thead> 
							<tbody>
								<volist name="list" id="vo">
									<tr>
										
										<!--<td>{$vo.time|mb_substr=3,8,utf8}</td>-->
										<td>{$vo.number}</td>
										<td>{$vo.jincai}</td>
										<td>{$vo.del_points}</td>
										<td>
											<if condition="$vo.is_add eq 1">{$vo['add_points']-$vo['del_points']}</if>
										</td>
										<td>{$vo.time|date="Y-m-d H:i:s",###}</td>
										
									</tr>
								</volist>
							</tbody>
						</table>
						<else/>
						<table class="table table-striped table-hover table-bordered">
							<volist name="list1" id="vo" key="i">
								<thead>
									<tr>
										<th colspan="6">
											<?php
												$periodnumber = $vo['number'];
												$awardnumbers = M('number')->where("periodnumber = $periodnumber")->order('id desc')->find();
												?>
												<span>Issue number：{$vo.number}
													<!--<if condition="$number eq $vo['number']">-->
													<if condition="$vo.is_add eq 0">
															(No prize)
														<else/>
															({$awardnumbers['awardnumbers']})
													</if>
												</span>
											<!-- <if condition="$number eq $vo['number']">
												<a class="bt bt-red" onclick="del_all('{$vo.number}')">全部取消</a>
											</if> -->
										</th>
									</tr>
								</thead>
								<thead>
									<tr>
										<th>Quiz time</th>
										<th>order number</th>
										<th>content</th>
										<th>points</th>
										<th>win/lose</th>
									</tr>	
								</thead>
								<tbody>
									<!--<volist name="vo.order" id="r">-->
										<tr>
											<td>{$vo.time|date="H:i:s",###}</td>
											<td>{$vo.id}</td>
											<td>{$vo.jincai}</td>
											<td>{$vo.del_points}</td>
											<td>
												<if condition="$vo['is_add'] eq 1">
													{$vo['add_points']-$vo['del_points']}
												</if>
											</td>
										</tr>
									<!--</volist-->
								</tbody>
							</volist>
						</table>
					</if>
				</empty>
			</div>
			
		</div>
		
		</div>
		<div class="pages">
				{$show}
			</div>
		
		<!-- <a class="back" href="{:U('Home/Run/index')}">返回游戏</a> -->
		<!-- <footer>
				<a href=" /Home/Run/index"><img src="__PUBLIC__/Home/img/11.png" alt="">
					<p>主页</p>
				</a>
				<a href="{:U('Home/Run/active')}"><img src="__PUBLIC__/Home/img/12.png" alt="">
					<p>优惠活动</p>
				</a>
				<a href="{:U('Home/User/index')}"><img src="__PUBLIC__/Home/img/13.png" alt="" >
					<p>个人中心</p>
				</a>
				<a href="#"  onclick ="openKefu()"><img src="__PUBLIC__/Home/img/14.png" alt="" >
					<p>在线客服</p>
				</a>
			</footer>
			<a href = "javascript:void(0)" onclick = "closeKefu()"><img src="__PUBLIC__/Home/img/close.png" alt=""  id="close4" class="close4">
			</a>
					<div id="light4" class="white_content4">
						<p>在线客服</p>
			   <img src="__PUBLIC__/Home/img/kefu1.jpg" alt="" style="display:block;width:6.33rem;height:8.26rem;margin:0.3rem auto;">
					   </div>
					<div id="fade4" class="black_overlay4"></div> -->
					<header>
							<nav>
								<a href="/Home/User/index">return</a>
								  <!-- <span>优惠活动</span> -->
							</nav>
						   </header>
		<script src='//cdn.bootcss.com/jquery/1.11.3/jquery.js'></script>
		<script src="__PUBLIC__/layer/layer.js"></script>
		<script>
	
			function openKefu(){
						  document.getElementById('light4').style.display='block';
						  document.getElementById('fade4').style.display='block';
						  document.getElementById('close4').style.display='block';
					  }
					function closeKefu(){
					  document.getElementById('light4').style.display='none';
					  document.getElementById('fade4').style.display='none';
					  document.getElementById('close4').style.display='none';
					}
		  </script>
		<script>
			function del(id){
				layer.open({
				    content: 'Are you sure you want to cancel？'
				    ,btn: ['sure', 'cancel']
				    ,yes: function(index){
				      	layer.close(index);
				      	$.ajax({
	                       	url: "{:U('Home/Run/del')}",
	                       	type: "post",
	                       	data:{'id':id},
	                       	dataType:'json',
	                       	error:function(){
	                       		parent.layer.open({content: 'The server is out of order~',skin: 'msg',time: 2});
		                    },
	                       	success:function(res){
	                       		location.href=location.href;
	                       	}
	                   	});
				    }
				});
			}
			function del_all(number){
				layer.open({
				    content: 'Are you sure you want to cancel？'
				    ,btn: ['sure', 'cancel']
				    ,yes: function(index){
				      	layer.close(index);
				      	$.ajax({
	                       	url: "{:U('Home/Run/del_all')}",
	                       	type: "post",
	                       	data:{'number':number},
	                       	dataType:'json',
	                       	error:function(){
	                       		parent.layer.open({content: 'The server is out of order~',skin: 'msg',time: 2});
		                    },
	                       	success:function(res){
	                       		location.href=location.href;
	                       	}
	                   	});
				    }
				});
			}
		</script>
	</body>
</html>